package ualrcdg.server.validators;

import java.io.InputStream;
import java.util.HashMap;

/**
 * Base (abstract) class from which all server-side rule validation implementation classes are derived. 
 */
public abstract class AbstractRuleValidator
{
	/**
	 * Primary rule validation method. Subclass implementations attempt to validate that a particular rule has been completed or achieved based on specified parameters and collected data.
	 * 
	 * @param rule the type of the rule being validated
	 * @param parameters the rule-specific parameters against which the collected data is being validated  
	 * @param input the relevant data collected
	 * @return true if the rule has been completed or achieved, false otherwise
	 */
	public abstract boolean validateRule( String rule, HashMap< String, String > parameters, InputStream input );
	
	public abstract AbstractRuleValidator getInstance( );
}
